const state = {
  currentCarIndex: sessionStorage.getItem("currentCarIndex") ?? 0,
};

const mutations = {
  SET_CURRENT_CAR_INDEX: (state, data) => {
    state.currentCarIndex = data;
    sessionStorage.setItem("currentCarIndex", data);
  },
};

const actions = {};

export default {
  namespaced: true,
  state,
  mutations,
  actions,
};
